var hi = 0
  , ii = 1
  , ji = 2;
var li = ["=", ".", "-", "*"]
  , mi = 8388608;
  function ni(a) {
    var b = a.charCodeAt(0);
    return "A" <= a && "Z" >= a ? b - 65 : "a" <= a && "z" >= a ? 26 + b - 97 : "0" <= a && "9" >= a ? 52 + b - 48 : "+" == a ? 62 : "/" == a ? 63 : -1
}
  function ki(a) {
    var b;
    b = a.charAt(0);
    var c = -1;
    b == li[1] ? c = ji : b == li[2] ? c = ii : b == li[3] && (c = hi);
    b = c;
    for (var c = a.substr(1), d = 0, e = c.length, f = [], a = [], g = []; d < e; )
        if (c.charAt(d) == li[0]) {
            if (13 > e - d)
                return 0;
            a: {
                for (var g = c.substr(d, 13), i = f, j = 0, l = 0, m = 0, n = 0; 6 > n; n++) {
                    m = ni(g.substr(1 + n, 1));
                    if (0 > m) {
                        g = -1 - n;
                        break a
                    }
                    j += m << 6 * n;
                    m = ni(g.substr(7 + n, 1));
                    if (0 > m) {
                        g = -7 - n;
                        break a
                    }
                    l += m << 6 * n
                }
                i.push(j);
                i.push(l);
                g = 0
            }
            if (0 > g)
                return 0;
            d += 13
        } else if (";" == c.charAt(d))
            a.push(f.slice(0)),
            f.length = 0,
            ++d;
        else {
            if (8 > e - d)
                return 0;
            g = oi(c.substr(d, 8), f);
            if (0 > g)
                return 0;
            d += 8
        }
    c = 0;
    for (d = a.length; c < d; c++) {
        e = 0;
        for (f = a[c].length; e < f; e++)
            a[c][e] /= 100
    }
    return {
        FX: b,
        Jd: a
    }
}
function eb(a) {
    return "string" == typeof a
}
function K(a, b) {
    isNaN(a) && (a = Pb(a),
    a = isNaN(a) ? 0 : a);
    eb(a) && (a = parseFloat(a));
    isNaN(b) && (b = Pb(b),
    b = isNaN(b) ? 0 : b);
    eb(b) && (b = parseFloat(b));
    this.lng = a;
    this.lat = b;
    this.pf = "inner"
}
p=null;
k=undefined;
dH = [1.289059486E7, 8362377.87, 5591021, 3481989.83, 1678043.12, 0];
cQ=6370996.81;
fv=[75, 60, 45, 30, 15, 0];
iQ=[[1.410526172116255E-8, 8.98305509648872E-6, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 1.73379812E7], [-7.435856389565537E-9, 8.983055097726239E-6, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 1.026014486E7], [-3.030883460898826E-8, 8.98305509983578E-6, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552E-8, 8.983055099779535E-6, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437E-9, 8.983055096812155E-6, 6.995724062E-5, 23.10934304144901, -2.3663490511E-4, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878E-9, 8.983055095805407E-6, -3.068298E-8, 7.47137025468032, -3.53937994E-6, -0.02145144861037, -1.234426596E-5, 1.0322952773E-4, -3.23890364E-6, 826088.5]];
aH=[[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [8.277824516172526E-4, 111320.7020463578, 6.477955746671607E8, -4.082003173641316E9, 1.077490566351142E10, -1.517187553151559E10, 1.205306533862167E10, -5.124939663577472E9, 9.133119359512032E8, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -2.339375119931662E7, 7.968221547186455E7, -1.159649932797253E8, 9.723671115602145E7, -4.366194633752821E7, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-3.441963504368392E-4, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-3.218135878613132E-4, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]];

function aL(a, b) {
    if (a && b) {
        var c = b[0] + b[1] * Math.abs(a.lng)
          , d = Math.abs(a.lat) / b[9]
          , d = b[2] + b[3] * d + b[4] * d * d + b[5] * d * d * d + b[6] * d * d * d * d + b[7] * d * d * d * d * d + b[8] * d * d * d * d * d * d
          , c = c * (0 > a.lng ? -1 : 1)
          , d = d * (0 > a.lat ? -1 : 1);
        return new K(c,d)
    }
};
function KSS(a) {
    if (a === p || a === k)
        return new K(0,0);
    var b, c;
    b = new K(Math.abs(a.lng),Math.abs(a.lat));
    for (var d = 0; d < dH.length; d++)
        if (b.lat >= this.dH[d]) {
            c = iQ[d];
            break
        }
    a =aL(a, c);
    return a = new K(a.lng.toFixed(6),a.lat.toFixed(6))
};
function sign(a) {
    b = true
    if ("string" == typeof a && a) {
        var c = a.split("|"), d, e, f;
        if (1 == c.length)
            d = ki(a);
        else if (d = ki(c[2]),
        e = ki(c[0]),
        f = ki(c[1]),
        !b)
            return d;
        c = {
            type: d.FX
        };
        if (b)
            switch (c.type) {
            case ji:
                e = new K(d.Jd[0][0],d.Jd[0][1]);
                e = KSS(e);
                c.point = e;
                c.ha = [e];
                break;
            case ii:
                c.ha = [];
                d = d.Jd[0];
                for (var g = 0, i = d.length - 1; g < i; g += 2) {
                    var j = new K(d[g],d[g + 1])
                      , j = T.ub(j);
                    c.ha.push(j)
                }
                e = new K(e.Jd[0][0],e.Jd[0][1]);
                f = new K(f.Jd[0][0],f.Jd[0][1]);
                e = T.ub(e);
                f = T.ub(f);
                c.$a = new lb(e,f)
            }

        return {'lng':c['point']['lng'],'lat':+c['point']['lat']}
    }
}
a = ".=cl27EB64GXVA;"
b = true
s = sign(a)
console.log(s)
